package com.xiangwei.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xiangwei.dao.ImageMapper;
import com.xiangwei.entity.Image;
import com.xiangwei.service.IImageService;
@Service
public class ImageServiceImpl implements IImageService {
	@Resource
	private ImageMapper imageMapper;
	
	@Override
	public int insertImage(Image img) {
		return imageMapper.insertSelective(img);
	}

	@Override
	public List<Image> getImagesByPidAndType(Image img) {
		return imageMapper.getImagesByPidAndType(img);
	}

	@Override
	public int delImagesByPidAndType(Image img) {
		return imageMapper.delImagesByPidAndType(img);
	}

	@Override
	public int delImageById(int id) {
		return imageMapper.deleteByPrimaryKey(id);
	}

}
